This invention relates to a channel processor for assigning code signals representing the detected key switches to respective ones of a plurality of channels for storage.
For producing a plurality of musical tones simultaneously in a digital type electronic musical instrument including a large number of key switches provided for selecting desired musical tones, channels equivalent in number to a maximum number of tones to be produced simultaneously which is smaller than the total number of keys are provided and production of a tone of a depressed key is assigned to a suitable one of such channels. Processing of signals in this type of electronic musical instrument is generally divided into detection of key switches in operation and tone production assignment on the basis of such detection of key switches.
There is a prior art device for detecting key switch operations and assigning tone production as disclosed in the specification of issued U.S. Pat. No. 3,882,751 in which all of key switches are sequentially scanned and a pulse is produced at a time slot corresponding to a key switch in operation among a train of time slots corresponding to the scanning and thus the key switch in operation is detected by the time slot at which a pulse is present and in which the signal representing the key switch in operation is stored in accordance with the assigned channel. According to this prior art device, the time slot at which the pulse is present is represented by time elapsed from a certain reference time point (i.e. a time point at which scanning starts) and data of the elapsed time are stored in a memory. The elapsed time differs for each of thekey switches and therefore is capable of discriminating one key switch from another. For example, sequential time slots during the scanning operation are counted by a counter (i.e. time elapsed from the reference time point is measured) and a count at the time slot at which the pulse exists is assigned and stored as an operating-key-switch identifying signal.
In the prior art devices, time required for detecting the key switch in operation is fixed depending upon the scanning time and this fixed time gives rise to waste of time. More specifically, since the number of keys depressed simultaneously is much smaller than the total number of the keys, the number of time slots at which no pulse is found as a result of detection is much greater than the number of time slots at which the pulse exists. No assignment operation is performed at time slots at which the pulse is absent and, accordingly, much time is spent in vain. Further, time allotted to actual processing of signals is sacrificed to a considerable extent due to this waste of time so that a circuit design with an ample operation time cannot be realized and this gives rise to an undesirable problem that a relatively high clock rate must be used in the system. Furthermore, the prior art construction in which all the key switches are scanned one by one within a fixed time tends to produce an undesirable time delay between the actual operation of the key switch and detection thereof.
The delayed detection of the depression of the key results in delay of production of the musical tone. Although the detection of the depression of the key is seldom delayed to such an extent that delay in production of the tone is perceivable to the human sense, the start of production of the tone should respond to the start of depression of the keys as quickly as possible. The prior art devices are apparently disadvantageous in this respect. If, on the other hand, cease of production of the tone does not immediately follow the release of the depressed key, this will not necessarily give an unnatural impression to the audience. This is because the cease of production of the tone is followed by echoes or attenuation of the tone and the time lag between the release of the key and the cease of reproduction of the tone is accepted by the audience as a matter of fact. Accordingly, the time lag is hardly perceptible to human heairing. For the reason stated above, importance is placed on a quick response of the detecting operation to the actual start of depression of the key.